<%-- 
    Document   : rolefragment
    Created on : May 10, 2013, 4:48:37 PM
    Author     : Tatyana
--%>

<%@page import="entity.Users"%>
<%@page import="entity.Role"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>




    <%        if (user != null) {
            if (!user.getRoleCollection().isEmpty()) {
    %> <table><tr><%
        for (Role r : user.getRoleCollection()) {
            if (r.getRoleName().equals("Administrator")) {%>

        <td><a href="/Delta-war/userview">Administrator dashboard</a></td>
        <%}
            if (r.getRoleName().equalsIgnoreCase("Warehouse Employee")) {%>
        <td><a href="/Delta-war/ViewWarehouse">Warehouse dashboard</a></td> 
        <%}
            if (r.getRoleName().equalsIgnoreCase("Customer")) {%>
        <td><a href="/Delta-war/user_name.jsp">Customer</a></td>
        <%}
            if (r.getRoleName().equalsIgnoreCase("Courier")) {%>
        <td><a href="/Delta-war/courier">Courier dashboard</a></td>
        <% }%>
    <%}%></tr></table><%
            }
    }%>